package cate.game.role.mall;

import cate.game.util.GameKit;
import easy.java.dev.note.NoteClass;
import easy.java.dev.note.NoteField;
import org.springframework.data.annotation.Id;

@NoteClass(value = "商品基础")
public class Commodity {
    @Id
    @NoteField(value = "唯一id")
    public String uid;

    @NoteField(value = "商品id")
    public int tid;

    @NoteField(value = "购买数量")
    public int purchaseNum;

    public Commodity() {}

    public Commodity(int tid) {
        this.uid = GameKit.uid();
        this.tid = tid;
    }

    @Override
    public String toString() {
        return "CommodityPO{" + "tid=" + tid + ", purchaseNum=" + purchaseNum + '}';
    }
}
